package com.example.testfullcalendar.pojo;


public enum StatusColorEnum {
    WAITING(1, "#4F94CD"),
    CONSULTATION(2, "#458B74"),
    END(3, "#8A8A8A");

    private Integer id;
    private String color;

    StatusColorEnum(Integer id, String color) {
        this.id = id;
        this.color = color;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public static String getColorById(Integer id) {
        for (StatusColorEnum statusColorEnum : StatusColorEnum.values()) {
            if (id.equals(statusColorEnum.getId())) {
                return statusColorEnum.getColor();
            }
        }
        return null;
    }

    public static StatusColorEnum getStatusColorEnumById(Integer id) {
        for (StatusColorEnum statusColorEnum : StatusColorEnum.values()) {
            if (id.equals(statusColorEnum.getId())) {
                return statusColorEnum;
            }
        }
        return null;
    }
}
